package cn.db101.jcc.controller;

import cn.db101.jcc.entity.Lineup;
import cn.db101.jcc.model.ResultModel;
import cn.db101.jcc.service.BannerService;
import cn.db101.jcc.service.LineupService;
import cn.db101.jcc.service.NewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author zooy
 * @create 2024-06-11 1:40
 * @description
 */
@RestController
@RequestMapping("v1/jcc/lineup")
public class LineupController {

    @Autowired
    private LineupService lineupService;

    @PostMapping("list")
    public ResultModel lineupList(@RequestBody Lineup lineup) {

        return ResultModel.success(lineupService.lineupList(lineup.getCategoryId()));
    }

    @PostMapping("one")
    public ResultModel lineupOne(@RequestBody Lineup lineup) {

        return ResultModel.success(lineupService.lineupOne(lineup.getId()));
    }

}
